package com.e2oto.seller.common.http;

import com.e2oto.seller.common.base.BaseBean;
import com.e2oto.seller.modules.launch.bean.CodeBean;
import com.e2oto.seller.modules.launch.bean.LoginBean;
import com.e2oto.seller.modules.seller.bean.FirstSystemCategoryBean;
import com.e2oto.seller.modules.seller.bean.AddGoodsFirstStepResultBean;
import com.e2oto.seller.modules.seller.bean.GoodsCategoryBean;
import com.e2oto.seller.modules.seller.bean.GoodsInfoBean;
import com.e2oto.seller.modules.seller.bean.SellerInfoBean;
import com.e2oto.seller.modules.seller.dto.AddGoodsAllCategoryBean;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;


public interface ApiService {

    @FormUrlEncoded
    @POST("index.php/seller/user/login")
    Observable<BaseBean<LoginBean>> login(@Field("param") String param, @Field("ver") String ver);


    @POST("index.php/seller/mobilemsg/sendRegister")
    Observable<BaseBean<CodeBean>> sendRegCode(@Body MultipartBody multipartBody);

    @POST("index.php/seller/mobilemsg/sendLogin")
    Observable<BaseBean<CodeBean>> sendLogin(@Body MultipartBody multipartBody);

    @FormUrlEncoded
    @POST("index.php/seller/user/register")
    Observable<BaseBean<LoginBean>> register(@Field("param") String param, @Field("ver") String ver);

    @FormUrlEncoded
    @POST("index.php/seller/mobilemsg/sendForgetPasswd")
    Observable<BaseBean<CodeBean>> sendForgetPasswd(@Field("param") String param, @Field("ver") String ver);

    @FormUrlEncoded
    @POST("index.php/seller/user/resetPasswdForMsg")
    Observable<BaseBean> resetPasswdForMsg(@Field("param") String param, @Field("ver") String ver);

    @FormUrlEncoded
    @POST("index.php/seller/category/getCategoryFirstAll")
    Observable<BaseBean<FirstSystemCategoryBean>> getSystemFirstCategoryAll(@Field("param") String param, @Field("ver") String ver);

    @POST("index.php/seller/seller/settleDown")
    Observable<BaseBean<LoginBean>> applySeller(@Body MultipartBody multipartBody);

    @FormUrlEncoded
    @POST("index.php/seller/seller/getSellerInfo")
    Observable<BaseBean<SellerInfoBean>> getSellerInfo(@Field("param") String param, @Field("ver") String ver);

    @POST("index.php/seller/seller/updateSellerInfo")
    Observable<BaseBean> updateSellerInfo(@Body MultipartBody multipartBody);

    @FormUrlEncoded
    @POST("index.php/seller/category/getCategorySecond")
    Observable<BaseBean<AddGoodsAllCategoryBean>> getCategorySecond(@Field("param") String param, @Field("ver") String ver);

    @POST("index.php/seller/batchgoods/addGoodsFirstStep")
    Observable<BaseBean<AddGoodsFirstStepResultBean>> addGoodsFirstStep(@Body MultipartBody multipartBody);

    @FormUrlEncoded
    @POST("index.php/seller/batchgoods/addGoodsSecondStep")
    Observable<BaseBean> addGoodsSecondStep(@Field("param") String param, @Field("ver") String ver);

    @POST("index.php/seller/batchgoods/addGoodsThirdStep")
    Observable<BaseBean> addGoodsThirdStep(@Body MultipartBody multipartBody);

    @FormUrlEncoded
    @POST("index.php/seller/batchgoods/getGoodsInfo")
    Observable<BaseBean<GoodsInfoBean>> getGoodsInfo(@Field("param") String param, @Field("ver") String ver);

    @POST("index.php/seller/batchgoods/updateGoodsInfo")
    Observable<BaseBean> updateGoodsInfo(@Body MultipartBody multipartBody);

    @FormUrlEncoded
    @POST(" index.php/seller/batchgoods/getGoodsList")
    Observable<BaseBean<List<GoodsCategoryBean>>> getGoodsList(@Field("param") String param, @Field("ver") String ver);
}
